<template>
    <div>
      <div class="tabview newsPageDiv">
        <Breadcrumb 
            :breadcrumbName="breadcrumbName"
            :routerLikeTo="routerLikeTo"
          />
          <a-divider style="margin-bottom:20px;" /> 
          <div class="card-container">
            <a-tabs type="card">
              <a-tab-pane key="1" tab="基本信息" >
                <baseinfo :infoData="infoData" />
              </a-tab-pane>
              <a-tab-pane key="2" tab="执业资格信息">
                <zyzgxxTable :ryid="infoData.id"/>
              </a-tab-pane>
              <a-tab-pane key="3" tab="良好行为记录">
                <lhxwjlTable :ryid="infoData.id"/>
              </a-tab-pane>
              <a-tab-pane key="4" tab="不良行为记录">
                <blhxwjlTable :ryid="infoData.id"/>
              </a-tab-pane>
            </a-tabs>
        </div>
      </div>
      <!-- <footerPage :page="4" ></footerPage> -->
    </div>
</template>

<script>
// import footerPage from '../../footer/footerPage'
import Breadcrumb from "@/components/base/tools/Breadcrumb1";
import baseinfo from "@/views/center/workingPerson/components/baseInfo";
import zyzgxxTable from "@/views/center/workingPerson/components/zyzgxx";
import lhxwjlTable from "@/views/center/workingPerson/components/lhxwjl";
import blhxwjlTable from "@/views/center/workingPerson/components/blhxwjl";
import api from '@/api/index'
  export default {
    name: "personDetail",
    inject: ["changeTab"],
    components: {
    //  footerPage,
     Breadcrumb,
     baseinfo,
     zyzgxxTable,
     lhxwjlTable,
     blhxwjlTable,
  },
    props: {
      page: {
        type: String,
        default: '1'
      },
    },
     data(){
      return{
        breadcrumbName:'',
        routerLikeTo:'/center/workingPersonPage',
        id:'',
        loading: true,
        infoData:{},
      }
      
    },
    created(){
      this.breadcrumbName = this.$route.query.breadcrumbName;
      this.id = this.$route.query.id
      this.get_ryxx_data();
      this.changeTab(6, "workingPersonPage", '<span class="tab_name">从业人员</span>');
    },
    methods: {
     get_ryxx_data(){
         api.get_ryxx_by_id(this.id).then(res => {
             this.infoData = res;
             this.loading = false;
             let fileData = this.infoData.file;
              if(fileData!=null && fileData!=""){
                this.infoData.fileupload = JSON.parse(this.infoData.file)
              }
          })
          .catch(err => {
            this.loading = false;
          });
      },
    }

  };
</script>
<style lang="less">
.breadcrumb{
  margin-top: 20px;
}
.card-container {
  // background: #f5f5f5;
  overflow: hidden;
  padding: 1px;
  margin-top:12px;
  
  .ant-tabs-nav {
    background: #F0F1F5;
    width: 100%;
    position: relative;
    display: inline-block;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    padding-left: 0;
    list-style: none;
    -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    transition: -webkit-transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), -webkit-transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  }
  
.ant-table-thead > tr > th {
    padding: 25px 16px;
    overflow-wrap: break-word;
}
.ant-table-thead > tr > th {
    color: rgba(0, 0, 0, 0.85);
    height: 60px;
	  font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #333333;
    text-align: left;
    background: #fafafa;
    border-bottom: 1px solid #e8e8e8;
    -webkit-transition: background 0.3s ease;
    transition: background 0.3s ease;
}

  .ant-table-tbody > tr > td {
      overflow-wrap: break-word;
      border-bottom: 2px dotted;
      border-color: #F1F1F1;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #333333;
  }
}
.card-container > .ant-tabs-card > .ant-tabs-content {
  height:auto;
  margin-top: -16px;
}

.card-container > .ant-tabs-card > .ant-tabs-content > .ant-tabs-tabpane {
  background: #fff;
  padding: 1px;
  padding-bottom: 24px;
}

.card-container > .ant-tabs-card > .ant-tabs-bar {
  border-color: #fff;
}

.card-container > .ant-tabs-card > .ant-tabs-bar .ant-tabs-tab {
  border-color: transparent;
  background: transparent;
}

.card-container > .ant-tabs-card > .ant-tabs-bar .ant-tabs-tab-active {
  border-color: #fff;
  background: #fff;
}

.card-container > .ant-tabs-card > .ant-tabs-bar .ant-tabs-tab-active {
    border-color: #fff;
    background: #fff;
    border-top-color: #337BD7;
    border-radius: 0px;
    color: #333333;
    font-size: 16px;
    font-weight: bold;
    font-family: Microsoft YaHei;
}
.card-container > .ant-tabs-card > .ant-tabs-tab {
    border-color: transparent;
    background: transparent;
    color: #666666;
    font-size: 16px;
    font-weight: 400;
    font-family: Microsoft YaHei;
}
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab {
    height: 60px;
    margin: 0;
    margin-right: 2px;
    padding: 0 40px;
    font-size: 16px;
    line-height: 60px;
}
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container {
    height: 60px;
}
.ant-tabs-bar {
    margin: 0 0 20px 0;
    border-bottom: 1px solid #e8e8e8;
    outline: none;
    -webkit-transition: padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    transition: padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container {
    height: 60px;
}
.p-base-info .ant-descriptions-bordered.ant-descriptions-small .ant-descriptions-item-label {
    padding: 24px 20px;
    text-align: center;
    color: #333333;
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    width: 150px;
}
.ant-tabs-bar {
    margin: 0 0 20px 0;
    border-bottom: 1px solid #e8e8e8;
    outline: none;
    -webkit-transition: padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    transition: padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.lhxwjl-bt{
  color: #333333;
  font-size: 16px;
  font-weight: 400;
  margin-top: 20px;
  margin-left: 10px;
  
}

</style>